const app=getApp()
Page({
    data:{
        fei:300,
        feiban:150,
        condition:false,
        statusBarHeight:app.globalData.statusBarHeight//顶部标题栏高度
    },
    home(){
      wx.redirectTo({
        url: '/pages/work1/index',
      })
    },
    switchchange(e){
        console.log(e)
        let condition=e.detail.value
        if(condition){
            this.setData({
                fei:0,
                feiban:0,
                condition
            })
        }else{
            this.setData({
            fei:300,
            feiban:150,
            condition
        })
        } 
    },
    formsubmit(e){
        let bd=Number(e.detail.value.property)
        let fei=300
        if(bd>200000){
            bd-=200000
            fei+=bd*.005
        }
        fei=fei.toFixed(2)
        let feiban=fei/2
        feiban=feiban.toFixed(2)
        this.setData({
            fei,feiban
        })
    }
})